<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>主页 - ShakesBeare</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Hosting Store Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>

    <%--<link href="${pageContext.request.contextPath}/static/admin/assets/css/minimal.css" rel="stylesheet"/>--%>
    <%--<link href="${pageContext.request.contextPath}/static/admin/assets/css/vendor/bootstrap/bootstrap.min.css" rel="stylesheet"/>--%>
    <link href="${pageContext.request.contextPath}/static/home/css/bootstrap.css" rel='stylesheet' type='text/css' />
    <script src="${pageContext.request.contextPath}/static/home/js/jquery-1.11.1.min.js"></script>
    <!--首页搜索框-->
    <link href="${pageContext.request.contextPath}/static/home/css/gd-home.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath}/static/home/css/gd-core.css" rel="stylesheet" type="text/css" />
    <!--首页登陆-->
    <link href="${pageContext.request.contextPath}/static/home/css/login.css" rel="stylesheet" type="text/css">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <!--轮播框-->
    <link href="${pageContext.request.contextPath}/static/home/css/feature.css" rel="stylesheet" type="text/css">
    <script src="${pageContext.request.contextPath}/static/home/js/jquery.flexisel.js"></script>
    <!-- Custom Theme files -->
    <link href="${pageContext.request.contextPath}/static/home/css/index_style.css" rel='stylesheet' type='text/css' />
    <!-- Custom Theme files -->
    <!-- webfonts -->
<%--<link href='http://fonts.useso.com/css?family=Ubuntu:300,400,500,700' rel='stylesheet' type='text/css'>--%>
    <!-- webfonts -->
    <!-- dropdown -->
    <!--fa图标-->
    <link href="${pageContext.request.contextPath}/static/home/css/font-awesome.css" rel="stylesheet" type="text/css">
    <link href="${pageContext.request.contextPath}/static/home/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!--&lt;!&ndash;按钮必要样式&ndash;&gt;-->
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/home/css/component.css" />
    <script src="${pageContext.request.contextPath}/static/home/js/html5.js"></script>
    <%--<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/bootstrap/bootstrap.min.js"></script>--%>

    <!-- webfonts -->
    <link href='${pageContext.request.contextPath}/static/home/css/font-awesome.css' rel='stylesheet' type='text/css'/>
    <!-- webfonts -->
    <!-- dropdown -->
    <script src="${pageContext.request.contextPath}/static/home/js/jquery.easydropdown.js"></script>

    <link href="${pageContext.request.contextPath}/static/home/css/nav.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="${pageContext.request.contextPath}/static/admin/css/sweetalert.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/home/css/cityselect.css" rel="stylesheet">

    <!-- start-smoth-scrolling -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/move-top.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/easing.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/bootstrapValidator.min.js"></script>



    <script src="${pageContext.request.contextPath}/static/admin/js/sweetalert.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/home/js/cityselect.js"></script>
    <!-- start-smoth-scrolling -->
    <!-- webfonts -->
    <%--<link href='http://fonts.useso.com/css?family=Ubuntu:300,400,500,700' rel='stylesheet' type='text/css'>--%>
    <!-- webfonts -->
    <!-- start-smoth-scrolling -->
    <script type="text/javascript">
        jQuery(document).ready(function($) {
            $(".scroll").click(function(event){
                event.preventDefault();
                $('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
            });
        });
    </script>
    <%--<!-- end-smoth-scrolling -->--%>
    <%if(request.getSession().getAttribute("type")!=null&&request.getSession().getAttribute("type").equals("1")){ %>
    <style>
        .abc div.hero div.srchBoxHolder>.tbl .cell.srchBoxCell div.srchBox .fields .cell {
            width: 96%;
        }
    </style>
    <%}%>
</head>
<!-- Header Starts Here -->
<div class="banner" >
    <%@include file="../header.jsp"%>


    <div id="large-header" class="large-header">
        <canvas id="demo-canvas"> </canvas>
        <div class="container abc">
            <div class="hero" style="position:relative;">
                <div class="srchBoxHolder">
                    <div class="tbl">
                        <div class='row notShown hideDesk hideTab'>
                            <div class='cell'>
                                <div class='noWidth'>
                                    <div class='fauxMenuBar'>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row1">
                            <div class="cell srchBoxCell">
                                <div class="srchBox" style="padding-right: 53px;">
                                    <form action='#' method='get' target='_top' class='heroSrch' data-allow-postal-codes='true' data-pick-best-match='true'>
                                        <input type='hidden' name='suggestCount' class='suggestCount' value='0'/>
                                        <input type='hidden' name='suggestChosen' class='suggestChosen' value='false'/>
                                        <input type='hidden' name='clickSource' value='searchBtn'/>
                                        <input type='hidden' name='typedKeyword' class='typedKey' value=""/>
                                        <ul class="opts">
                                            <li class="button1 btns btns-2" data-url="#" data-type="JOBS" data-placeholder="职位关键词">
                                                <% if(request.getSession().getAttribute("type") == null||request.getSession().getAttribute("type").equals("0")){%>
                                                职位关键词
                                                <% }else if(request.getSession().getAttribute("type").equals("1")){ %>
                                                简历关键词
                                                <%}%>
                                                <span class="pp"></span></li>
                                            <% if(request.getSession().getAttribute("type") == null||request.getSession().getAttribute("type").equals("0")){%>
                                            <li class="button1 btns btns-2" dara-url="#" data-type="COMPANY" data-placeholder="工作地点">工作地点
                                                <span class="pp"></span></li>
                                            <%}%>
                                        </ul>
                                        <div class='fields tbl tighten'>
                                            <div class='keyword cell'>
                                                <label for='KeywordSearch' class='offScreen'>Keyword</label>
                                                <input type='text' class='std keyword lg gradient' id='KeywordSearch' name='sc.keyword' value='' placeholder="<% if(request.getSession().getAttribute("type") == null||request.getSession().getAttribute("type").equals("0")){%>职位名称、公司名称等关键词
                                                <% }else if(request.getSession().getAttribute("type") != null && request.getSession().getAttribute("type").equals("1")){ %>期望职位名称
                                                <%}%>"
                                                       data-auto-complete='true' autofocus='autofocus'/> </div>

                                            <% if(request.getSession().getAttribute("type") == null||request.getSession().getAttribute("type").equals("0")){%>
                                            <div class='loc cell'>
                                                <div class="demo">
                                                    <input type="text" class="cityinput" id="citySelect" placeholder="请输入目的地" value="">
                                                </div>
                                            </div>
                                            <%}%>



                                            <%--<div class='z cell showHH'>--%>
                                                <%--<button type='submit' data-btn-id='' class='fill gd-btn gd-btn-submit gd-btn-1 gd-btn-lg gradient'>--%>
                                                    <%--<span>Search</span>--%>
                                                    <%--<i class='hlpr'></i>--%>
                                                <%--</button>--%>
                                            <%--</div>--%>
                                            <div class='btn cell hideHH' style="float: left;padding-left: 0px;">
                                                <button type='button' data-btn-id=''  onclick="search()" class=' gd-btn gd-btn-submit gd-btn-1 gd-btn-lg gd-btn-icon gradient' style="margin-top: -7px">
                                                    <i class='search '> </i>
                                                    <i class='hlpr'></i>
                                                    <span class='offScreen'>Search</span>
                                                </button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                        <%--<div class="row1">--%>
                            <%--<div class="cell srchBoxCell">--%>
                               <%--&lt;%&ndash; <div class="srchBox">--%>
                                    <%--<form action='#' method='get' target='_top' class='heroSrch' data-allow-postal-codes='true' data-pick-best-match='true'>--%>
                                        <%--<input type='hidden' name='suggestCount' class='suggestCount' value='0'/>--%>
                                        <%--<input type='hidden' name='suggestChosen' class='suggestChosen' value='false'/>--%>
                                        <%--<input type='hidden' name='clickSource' value='searchBtn'/>--%>
                                        <%--<input type='hidden' name='typedKeyword' class='typedKey' value=""/>--%>
                                        <%--<ul class="opts">--%>
                                            <%--<li class="button1 btns btns-2" data-url="#" data-type="JOBS" data-placeholder="职位名称">职位搜寻--%>
                                                <%--<span class="pp"></span></li>--%>
                                            <%--<li class="button1 btns btns-2" dara-url="#" data-type="COMPANY" data-placeholder="公司名称">公司搜寻--%>
                                                <%--<span class="pp"></span></li>--%>
                                        <%--</ul>--%>
                                        <%--<div class='fields tbl tighten'>--%>
                                            <%--<div class='keyword cell'>--%>
                                                <%--<label for='KeywordSearch' class='offScreen'>Keyword</label>--%>
                                                <%--<input type='text' class='std keyword lg gradient' id='KeywordSearch' name='sc.keyword' value='' placeholder="职位名称、公司名称等关键词"--%>
                                                       <%--data-auto-complete='true' autofocus='autofocus'/> </div>--%>
                                            <%--<div class='loc cell'>--%>
                                                <%--<label for='LocationSearch' class='offScreen'>Location</label>--%>
                                                <%--<input id='LocationSearch' type='text' value='广州，广东' data-srch-type='popular' class='std loc med gradient lg prefilled' placeholder='Location'/>--%>
                                                <%--<input type='hidden' class='locType' name='locT' value='C'/>--%>
                                                <%--<input type='hidden' class='locId' name='locId' value='2365108'/>--%>
                                                <%--<input type='hidden' class='jobType' name='jobType' value=''/>--%>
                                            <%--</div>--%>
                                            <%--<div class='z cell showHH'>--%>
                                                <%--<button type='submit' data-btn-id='' class='fill gd-btn gd-btn-submit gd-btn-1 gd-btn-lg gradient'>--%>
                                                    <%--<span>Search</span>--%>
                                                    <%--<i class='hlpr'></i>--%>
                                                <%--</button>--%>
                                            <%--</div>--%>
                                            <%--<div class='btn cell hideHH' style="float: left;padding:0">--%>
                                                <%--<button type='submit' data-btn-id='' class=' gd-btn gd-btn-submit gd-btn-1 gd-btn-lg gd-btn-icon gradient'>--%>
                                                    <%--<i class='search '> </i>--%>
                                                    <%--<i class='hlpr'></i>--%>
                                                    <%--<span class='offScreen'>Search</span>--%>
                                                <%--</button>--%>
                                            <%--</div>--%>
                                        <%--</div>--%>
                                    <%--</form>--%>
                                <%--</div>&ndash;%&gt;--%>
                            <%--</div>--%>
                        <%--</div>--%>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%--<input type="text" id="status" style="display: none" value="<% if(request.getSession().getAttribute("type") == null){%>0<% }else if(request.getSession().getAttribute("type").equals("0")){ %>1<% }else if(request.getSession().getAttribute("type").equals("1")){ %>2<% } %>">--%>
<% if(request.getSession().getAttribute("type") == null){%>
<input type="text" id="status" style="display: none" value="0">
<% }else if(request.getSession().getAttribute("type").equals("0")){ %>
<input type="text" id="status" style="display: none" value="1">
<% }else if(request.getSession().getAttribute("type").equals("1")){ %>
<input type="text" id="status" style="display: none" value="2">
<% } %>
<div class="clearfix"> </div>
<!-- Header Ends Here -->
<!--Main Starts Here-->
<div class="feature">
    <div class="container">
        <div class="fle-xsel">
            <ul id="flexiselDemo3">
                <c:forEach items="${adList}" var="item">
                    <li><a href="${item.ad_url}"><img src="${pageContext.request.contextPath}/upload/ad/${item.ad_imgurl}" class="img-responsive" alt=""></a></li>
                </c:forEach>
            </ul>


            <div class="clearfix"> </div>

        </div>
    </div>
</div>
<!--Main Ends Here-->


<!-- #Footer -->
<%@include file="../footer.jsp"%>
<!-- /#Footer -->
<!-- here stars scrolling icon -->
<script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/jquery.flexisel.js"></script>
<script src="${pageContext.request.contextPath}/static/home/js/TweenLite.min.js"></script>
<script src="${pageContext.request.contextPath}/static/home/js/EasePack.min.js"></script>
<script src="${pageContext.request.contextPath}/static/home/js/rAF.js"></script>
<script src="${pageContext.request.contextPath}/static/home/js/demo-3.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        /*
         var defaults = {
         containerID: 'toTop', // fading element id
         containerHoverID: 'toTopHover', // fading element hover id
         scrollSpeed: 1200,
         easingType: 'linear'
         };
         */

        $().UItoTop({ easingType: 'easeOutQuart' });

    });


</script>

<script type="text/javascript">
    var test=new Vcity.CitySelector({input:'citySelect'});
</script>
<script type="text/javascript">
    $(window).load(function() {
        $("#flexiselDemo3").flexisel({
            visibleItems: 8,
            animationSpeed: 1000,
            autoPlay: true,
            autoPlaySpeed: 3000,
            pauseOnHover: true,
            enableResponsiveBreakpoints: true,
            responsiveBreakpoints: {
                portrait: {
                    changePoint:480,
                    visibleItems: 2
                },
                landscape: {
                    changePoint:640,
                    visibleItems: 3
                },
                tablet: {
                    changePoint:768,
                    visibleItems: 3
                }
            }
        });

    });
</script>
<script>
    function search(){
        var search_name=$('#KeywordSearch').val();
        var city = $('#citySelect').val();
        var city_id = 0;
        var industry_id = 0;
        var job_property_id = 0;
        var zone = 0;
        var salary_type_id = 0;
        var degree_id = 0;
        var work_year = 0;
        var sex = '';
        var status = $('#status').val();
        console.log(status);
        $.ajax({
            type:'post',
            url:'${pageContext.request.contextPath}/getAllCity.action',
            success:function(data){
                for(var i in data){
                    if(city == data[i].name){
                        city_id = data[i].city_id;
                        if(status==0){
                            window.location.href="${pageContext.request.contextPath}/searchJob.action?search_name="+search_name+"&city_id="+city_id+"&industry_id="+industry_id+"&job_property_id="+job_property_id+"&zone="+zone+"&salary_type_id="+salary_type_id+"&degree_id="+degree_id+"";

                        }else if(status==1) {

                            window.location.href="${pageContext.request.contextPath}/home/job/searchJob.action?search_name="+search_name+"&city_id="+city_id+"&industry_id="+industry_id+"&job_property_id="+job_property_id+"&zone="+zone+"&salary_type_id="+salary_type_id+"&degree_id="+degree_id+"";

                        }else{

                            window.location.href="${pageContext.request.contextPath}/home/resume/searchResume.action?jobName="+search_name+"&work_year="+work_year+"&industry_id="+industry_id+"&sex="+sex+"&salary_type_id="+salary_type_id+"&degree_id="+degree_id+"";
                        }
                    }
                }
                if (city_id==0) {
                    if(status==0){

                        window.location.href="${pageContext.request.contextPath}/searchJob.action?search_name="+search_name+"&city_id="+city_id+"&industry_id="+industry_id+"&job_property_id="+job_property_id+"&zone="+zone+"&salary_type_id="+salary_type_id+"&degree_id="+degree_id+"";

                    }else if(status==1) {

                        window.location.href="${pageContext.request.contextPath}/home/job/searchJob.action?search_name="+search_name+"&city_id="+city_id+"&industry_id="+industry_id+"&job_property_id="+job_property_id+"&zone="+zone+"&salary_type_id="+salary_type_id+"&degree_id="+degree_id+"";

                    }else{

                        window.location.href="${pageContext.request.contextPath}/home/resume/searchResume.action?jobName="+search_name+"&work_year="+work_year+"&industry_id="+industry_id+"&sex="+sex+"&salary_type_id="+salary_type_id+"&degree_id="+degree_id+"";

                    }
                }

            }
        });
    }
</script>
<!-- //here ends scrolling icon -->
</body>
</html>
